package com.icss.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.icss.model.Item;
import com.icss.model.ItemCategory;

public interface ItemDao {
	@Insert("insert into item values(default,#{name},#{price},#{itemcate},#{url1},default)")
	public int add(Item item);
	@Select("select id,name from item_category")
	public List<ItemCategory> findAllCate();
	
	@Select("select id,name,price,itemcate,url1,data from item")
	public List<Item> findAll();
	
	@Select("select id,name,price,itemcate,url1,data from item limit #{start},#{pageSize}")
	public List<Item> findByPage(Map<String, Integer>map);
}
